/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package co.poli.utilidades;


import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;

/**
 *
 * @author user
 */
public class Util {

    private static Util instance;

    AdapterPanel adapter;

    public static Util getInstance() {

        if (instance == null) {
            instance = new Util();
        }
        return instance;
    }

    /**
     *
     * @param internalFrame
     * @param jDesktopPane1
     */
    public void CentrarVentanaInterna(JInternalFrame internalFrame, JDesktopPane jDesktopPane1) {
        int x = (jDesktopPane1.getWidth() / 2) - internalFrame.getWidth() / 2;
        int y = (jDesktopPane1.getHeight() / 2) - internalFrame.getHeight() / 2;
        internalFrame.setLocation(x, y);

    }

    
    public static void limpiar(JTextField ...componente){
        
        for (JTextField caja : componente) {
            caja.setText("");
        }
        
    }
  

}
